<?php
    $fp = fopen("logs/log.text","a");
    $text = "";
    if(isset($_GET['start'])){
        $text = "\nStarted at ".date("Y-m-d h:i:s")."\n";
        $ua = $_POST['ua'];
        $width = $_POST['width'];
        $height = $_POST['height'];
        
        $text .= "User Agent : $ua \nScreen width : $width \t Screen Height : $height \n";
        
    }
    if(isset($_GET['common'])){
        $text = "\n".$_POST['message']."\n";
    }
    
    fwrite($fp,$text);
    fclose($fp);
?>
    